<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Login
 *
 * @author Kam
 */
class Application_Form_User_Login extends My_Form {

    public function init() {
        $this->setTitle($this->translate('XXX_USER_LOGIN_FORM_TITLE'));
        $this->showLabels(false);

        $email = new Zend_Form_Element_Text('email');
        $email->setLabel(_('XXX_USER_LOGIN_FORM_EMAIL_LABEL'));
        $email->setAttrib('placeholder', $this->_('XXX_USER_LOGIN_FORM_EMAIL_LABEL'));
        $email->setRequired();
        $email->addValidator('EmailAddress');
        $this->addElement($email);

        $pass = new Zend_Form_Element_Password('pass');
        $pass->setLabel(_('XXX_USER_LOGIN_FORM_PASS_LABEL'));
        $pass->setAttrib('placeholder', $this->_('XXX_USER_LOGIN_FORM_PASS_LABEL'));
        $pass->setRequired();
        $this->addElement($pass);

        $btn = $this->addSubmitElement()->setLabel(_('XXX_USER_LOGIN_FORM_BUTTON'));
        $class = $btn->getAttrib('class');
        $btn->setAttrib('class', $class . ' span12');
    }

}

